/*
 * navy.h
 *
 *  Created on: 03.11.2012
 *      Author: Myrex
 */

#ifndef NAVY_H_
#define NAVY_H_

#include <quater.h>

#define ROUGH_CYCL  1000
#define PRECI_CYCL  10000

//really not good
extern double quant_time;

typedef enum{

	navi_idle = 0,
	navi_rough,
	navi_prec_ready,
	navi_prec,
	navi_work

} navi_state_e;

typedef struct{
	double psi, theta,gamma;
	quater_t qv;
} nv_ori_t;

typedef struct {
	double lat,lon;
	double h;
}nv_pos_t;


typedef struct {
	nv_pos_t coord;
	nv_ori_t bkv;
	nv_ori_t isk;
} navi_t;

int navi_start();
int navi_step(navi_t *inf);

void navi_set_lat(double nlat);
void navi_set_lon(double nlon);
#endif /* NAVY_H_ */
